package com.situ.mall.web.controller;

import com.situ.mall.common.service.IWXAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author yangkx
 * @create 2024-04-23-17:38
 * 微信小程序上传文件控制器
 */
@RestController
@RequestMapping("/client")
public class WXAttachmentController {

    @Autowired
    private IWXAttachmentService iwxAttachmentService;

    //微信小程序文件上传
    @PostMapping("/wxUpload/uploadFile")
    public String wxUpload(MultipartFile file) {
        return iwxAttachmentService.wxUpload(file);
    }

}
